﻿namespace EasyGo.Data
{
    using System;

    using EasyGo.Logic;

    using StructureMap.Configuration.DSL;
    using StructureMap.Graph;

    public class RepositoriesRegistration : IRegistrationConvention
    {
        public void Process(Type type, Registry registry)
        {
            var repository = type.GetInterface(typeof(IRepository<>).FullName);
            if (repository != null)
            {
                registry.AddType(repository, type);
            }
        }
    }
}
